<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>定位练习</title>

    <style>
        * {
            margin: 0;
            padding: 0;
        }
        
        .w {
            width: 1200px;
            margin: 0 auto;
            height: 1000px;
            background-color: black;
        }
        
        .top {
            position: fixed;
            top: 50%;
            left: 50%;
            margin-left: 605px;
            width: 50px;
            height: 50px;
            background-color: rgba(0, 0, 0, 0.5);
            text-align: center;
            line-height: 30px;
        }
        
        .top a {
            text-decoration: none;
            color: white;
            font-size: 40px;
        }
    </style>


</head>

<body>
    <a id="t"></a>
    <h3 style="text-align: center;">顶部</h3>

    <div class="top">
        <a href="#t">︽</a>
    </div>
    <div class="w">

    </div>



    <br> <br> <br> <br> <br> <br> <br> <br> <br>
    <br> <br> <br> <br> <br> <br><br> <br> <br>
    <br> <br> <br> <br> <br> <br>




</body>

</html>